$(document).ready(function () {
    // 图片预览
    $(".file-path").on("change",function() {
        var srcAll = getObjectURL(this.files[0]);   //获取路径
        $(this).siblings('.add-img').addClass('hide');  //this指的是input
        $(this).siblings(".back-pic").show();
        $(this).parent(".pictures-one").css("border","none");
        $(this).parent().next().children('.add-img').removeClass('hide');
        $(this).parent().next().children('.file-path').removeAttr('disabled');
        $(this).nextAll(".back-pic").attr("src",srcAll);
    });
    $(".input-img-btn").change(function(){
        var objUrl = getObjectURL(this.files[0]) ;
        if (objUrl) {
            $("#img0").attr("src", objUrl);
        }
        $("#add-img-btn").addClass('hideDom');
        $("#logo-container").css("border","none");
    });
    function getObjectURL(file) {
        var url = null;
        if (window.createObjectURL !== undefined) {
            url = window.createObjectURL(file)
        } else if (window.URL !== undefined) {
            url = window.URL.createObjectURL(file)
        } else if (window.webkitURL !== undefined) {
            url = window.webkitURL.createObjectURL(file)
        }
        return url
    };
});

var changeTitle= function(changeId,id1,id2){
    var content = $(".content");
    $("#title"+changeId).css("background-color","#ffffff").css("color","#7EC0EE")
        .css("border-left","3px solid #3385FF");
    $("#title"+id1).css("background-color","rgb(245, 245, 245)").css("color","#A3A3A3")
        .css("border-left","none");
    $("#title"+id2).css("background-color","rgb(245, 245, 245)").css("color","#A3A3A3")
        .css("border-left","none");
    if(changeId ===1){
        $(".interFix").removeClass('hideDom')
        $(".teamWork").addClass('hideDom');
        $(".feedBack").addClass('hideDom');
    }
    if(changeId ===2){
        $(".interFix").addClass('hideDom')
        $(".teamWork").removeClass('hideDom');
        $(".feedBack").addClass('hideDom');
    }
    if(changeId ===3){
        $(".interFix").addClass('hideDom')
        $(".teamWork").addClass('hideDom');
        $(".feedBack").removeClass('hideDom');
    }
};
